#pragma once
#include <iostream>
using namespace std;
typedef int Element;

class SLTNode
{
public:
	void BuySLTNode(SLTNode*& newnode, Element val);
	void PushFront(Element val,SLTNode*& head);
	void PushTail(Element val, SLTNode*& head);
	void Print();
	void PopBack(SLTNode*& head);
	void PopFront(SLTNode*& head);
	SLTNode*& Find(Element val);
	void Revise(SLTNode*& p, Element val);
	void Insert(Element val,SLTNode* pos, SLTNode*& a);
	void Erase(SLTNode*& a, SLTNode*& pos);
	~SLTNode();
private:
	Element _e = 0;
	SLTNode* _next = nullptr;
};